﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace BoxScore.jugador
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            int _index = 0;
            DataTable tabla = new DataTable();
            tabla = (DataTable) ViewState["GridView1"];
            foreach (DataRow fila in tabla.Rows)
            {
                if( fila[1].ToString().Contains(this.TextBox3.Text))
                {
                    tabla.Rows.RemoveAt(_index);
                }
                _index++;
            }
            this.GridView1.DataSource = tabla;
            GridView1.DataBind();
            
        }
    }
}
